% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colcounter_xyz.R
\name{colcounter}
\alias{colcounter}
\title{Count columns with Value (at or) above (or below) threshold}
\usage{
colcounter(
  x,
  threshold,
  or.tied = TRUE,
  na.rm = TRUE,
  below = FALSE,
  one.cut.per.col = FALSE
)
}
\arguments{
\item{x}{Data.frame or matrix of numbers to be compared to threshold value.}

\item{threshold}{numeric threshold value to compare to}

\item{or.tied}{if TRUE, include ties (value in x equals threshold)}

\item{na.rm}{if TRUE, used by colcounter to count only the non-NA columns in given row}

\item{below}{if TRUE, count x below threshold not above threshold}

\item{one.cut.per.col}{if FALSE, compare 1 threshold to all of x.
If TRUE, specify one threshold per column.}
}
\value{
vector of counts as long as NROW(x)
}
\description{
Count columns with Value (at or) above (or below) threshold
}
\examples{
\dontrun{
  pdata <- data.frame(a=rep(80,4),b=rep(93,4), col3=c(49,98,100,100))
 # pdata <- data.frame(testoutput_ejamit_10pts_1miles$results_bysite)[ , names_e_pctile]
 pcuts <-  5 * (0:20) 
colcounter_summary(        pdata, pcuts)
colcounter_summary_pct(    pdata, pcuts)
colcounter_summary_cum(    pdata, pcuts)
colcounter_summary_cum_pct(pdata, pcuts)
colcounter_summary_cum_pct(pdata, 5 * (10:20))

x80 <- colcounter(pdata, threshold = 80, or.tied = T)
x95 <- colcounter(pdata, threshold = 95, or.tied = T)
table(x95)
tablefixed(x95, NCOL(pdata))
cbind(at80=tablefixed(x80, NCOL(pdata)), at95=tablefixed(x95, NCOL(pdata)))
  }

}
\seealso{
\code{\link[=colcounter_summary_all]{colcounter_summary_all()}} \code{\link[=colcounter_summary]{colcounter_summary()}} \code{\link[=colcounter_summary_cum]{colcounter_summary_cum()}} \code{\link[=colcounter_summary_pct]{colcounter_summary_pct()}} \code{\link[=colcounter_summary_cum_pct]{colcounter_summary_cum_pct()}}
}
